// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 初始化选题配置 */
export async function saveRecordInitAssign() {
  return request<BaseResponseBean.response<InstructRecordData.InitConfigResult>>(
    '/instruct/record/save/init/assign',
    {
      method: 'POST',
    },
  );
}

/** 初始化选题配置 */
export async function saveRecordInitAssignOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/instruct/record/save/init/assign/organization',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/**
 * 获取树形 联络人列表
 * @returns
 */
export async function saveRecordInitAssignAccount(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/instruct/record/save/init/assign/account',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/**
 * 获取树形 联络人列表
 * @returns
 */
export async function saveRecordInitAssignContact(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>(
    '/instruct/record/save/init/assign/contact',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 保存记录  */
export async function saveInstructRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<InstructRecordData.ResultDetails>>('/instruct/record/save', {
    method: 'POST',
    data: options || {},
  });
}
/** 更新记录  */
export async function updateInstructRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<InstructRecordData.ResultDetails>>('/instruct/record/update', {
    method: 'POST',
    data: options || {},
  });
}

/** 删除记录  */
export async function deleteInstructRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<InstructRecordData.ResultDetails>>('/instruct/record/delete', {
    method: 'POST',
    data: options || {},
  });
}


/** 推送消息  */
export async function pushRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/instruct/record/save/push', {
    method: 'POST',
    data: options || {},
  });
}

/** 选择 记录  */
export async function selectRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<InstructRecordData.ResultDetails>>(
    '/instruct/record/select',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 分页 记录  */
export async function pageRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<InstructRecordData.PageVo[]>>(
    '/instruct/record/page',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

// /** 获取 通知栏 组织 阅读 详情 */
// export async function listBulletinAssign(options?: { [key: string]: any }) {
//   return request<BaseResponseBean.responsePage<BulletinData.AssignResultVo[]>>(
//     '/bulletin/assign/list',
//     {
//       method: 'POST',
//       data: options || {},
//     },
//   );
// }

// /** 获取 通知栏 人员 阅读 反馈  */
// export async function listBulletinContact(options?: { [key: string]: any }) {
//   return request<BaseResponseBean.responsePage<BulletinData.AssignResultVo[]>>(
//     '/bulletin/contact/list',
//     {
//       method: 'POST',
//       data: options || {},
//     },
//   );
// }

/** 回执 情况  */
export async function receiptRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>('/instruct/record/receipt', {
    method: 'POST',
    data: options || {},
  });
}

/** 一键催办   */
export async function reminders(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/instruct/record/hasten', {
    method: 'POST',
    data: options || {},
  });
}


/** 审批   */
export async function manageRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/instruct/record/examine', {
    method: 'POST',
    data: options || {},
  });
}